/*
 * XML Type:  RequestType
 * Namespace: http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd
 * Java type: cgl.narada.wsinfra.schemas.wsr.RequestType
 *
 * Automatically generated - do not modify.
 */
package cgl.narada.wsinfra.schemas.wsr.impl;
/**
 * An XML RequestType(@http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd).
 *
 * This is a complex type.
 */
public class RequestTypeImpl extends cgl.narada.wsinfra.schemas.wsr.impl.HeaderBaseTypeImpl implements cgl.narada.wsinfra.schemas.wsr.RequestType
{
    
    public RequestTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName MESSAGEID$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "MessageId");
    private static final javax.xml.namespace.QName EXPIRYTIME$2 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "ExpiryTime");
    private static final javax.xml.namespace.QName REPLYPATTERN$4 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "ReplyPattern");
    private static final javax.xml.namespace.QName ACKREQUESTED$6 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "AckRequested");
    private static final javax.xml.namespace.QName DUPLICATEELIMINATION$8 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "DuplicateElimination");
    private static final javax.xml.namespace.QName MESSAGEORDER$10 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "MessageOrder");
    
    
    /**
     * Gets the "MessageId" element
     */
    public cgl.narada.wsinfra.schemas.wsr.MessageIdType getMessageId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.MessageIdType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.MessageIdType)get_store().find_element_user(MESSAGEID$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "MessageId" element
     */
    public void setMessageId(cgl.narada.wsinfra.schemas.wsr.MessageIdType messageId)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.MessageIdType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.MessageIdType)get_store().find_element_user(MESSAGEID$0, 0);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.MessageIdType)get_store().add_element_user(MESSAGEID$0);
            }
            target.set(messageId);
        }
    }
    
    /**
     * Appends and returns a new empty "MessageId" element
     */
    public cgl.narada.wsinfra.schemas.wsr.MessageIdType addNewMessageId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.MessageIdType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.MessageIdType)get_store().add_element_user(MESSAGEID$0);
            return target;
        }
    }
    
    /**
     * Gets the "ExpiryTime" element
     */
    public java.util.Calendar getExpiryTime()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXPIRYTIME$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getCalendarValue();
        }
    }
    
    /**
     * Gets (as xml) the "ExpiryTime" element
     */
    public org.apache.xmlbeans.XmlDateTime xgetExpiryTime()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDateTime target = null;
            target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(EXPIRYTIME$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "ExpiryTime" element
     */
    public void setExpiryTime(java.util.Calendar expiryTime)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXPIRYTIME$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EXPIRYTIME$2);
            }
            target.setCalendarValue(expiryTime);
        }
    }
    
    /**
     * Sets (as xml) the "ExpiryTime" element
     */
    public void xsetExpiryTime(org.apache.xmlbeans.XmlDateTime expiryTime)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDateTime target = null;
            target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(EXPIRYTIME$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(EXPIRYTIME$2);
            }
            target.set(expiryTime);
        }
    }
    
    /**
     * Gets the "ReplyPattern" element
     */
    public cgl.narada.wsinfra.schemas.wsr.ReplyPatternType getReplyPattern()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.ReplyPatternType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.ReplyPatternType)get_store().find_element_user(REPLYPATTERN$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "ReplyPattern" element
     */
    public void setReplyPattern(cgl.narada.wsinfra.schemas.wsr.ReplyPatternType replyPattern)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.ReplyPatternType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.ReplyPatternType)get_store().find_element_user(REPLYPATTERN$4, 0);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.ReplyPatternType)get_store().add_element_user(REPLYPATTERN$4);
            }
            target.set(replyPattern);
        }
    }
    
    /**
     * Appends and returns a new empty "ReplyPattern" element
     */
    public cgl.narada.wsinfra.schemas.wsr.ReplyPatternType addNewReplyPattern()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.ReplyPatternType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.ReplyPatternType)get_store().add_element_user(REPLYPATTERN$4);
            return target;
        }
    }
    
    /**
     * Gets the "AckRequested" element
     */
    public cgl.narada.wsinfra.schemas.wsr.EmptyType getAckRequested()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().find_element_user(ACKREQUESTED$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "AckRequested" element
     */
    public boolean isSetAckRequested()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ACKREQUESTED$6) != 0;
        }
    }
    
    /**
     * Sets the "AckRequested" element
     */
    public void setAckRequested(cgl.narada.wsinfra.schemas.wsr.EmptyType ackRequested)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().find_element_user(ACKREQUESTED$6, 0);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().add_element_user(ACKREQUESTED$6);
            }
            target.set(ackRequested);
        }
    }
    
    /**
     * Appends and returns a new empty "AckRequested" element
     */
    public cgl.narada.wsinfra.schemas.wsr.EmptyType addNewAckRequested()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().add_element_user(ACKREQUESTED$6);
            return target;
        }
    }
    
    /**
     * Unsets the "AckRequested" element
     */
    public void unsetAckRequested()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ACKREQUESTED$6, 0);
        }
    }
    
    /**
     * Gets the "DuplicateElimination" element
     */
    public cgl.narada.wsinfra.schemas.wsr.EmptyType getDuplicateElimination()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().find_element_user(DUPLICATEELIMINATION$8, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "DuplicateElimination" element
     */
    public boolean isSetDuplicateElimination()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DUPLICATEELIMINATION$8) != 0;
        }
    }
    
    /**
     * Sets the "DuplicateElimination" element
     */
    public void setDuplicateElimination(cgl.narada.wsinfra.schemas.wsr.EmptyType duplicateElimination)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().find_element_user(DUPLICATEELIMINATION$8, 0);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().add_element_user(DUPLICATEELIMINATION$8);
            }
            target.set(duplicateElimination);
        }
    }
    
    /**
     * Appends and returns a new empty "DuplicateElimination" element
     */
    public cgl.narada.wsinfra.schemas.wsr.EmptyType addNewDuplicateElimination()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().add_element_user(DUPLICATEELIMINATION$8);
            return target;
        }
    }
    
    /**
     * Unsets the "DuplicateElimination" element
     */
    public void unsetDuplicateElimination()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DUPLICATEELIMINATION$8, 0);
        }
    }
    
    /**
     * Gets the "MessageOrder" element
     */
    public cgl.narada.wsinfra.schemas.wsr.EmptyType getMessageOrder()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().find_element_user(MESSAGEORDER$10, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "MessageOrder" element
     */
    public boolean isSetMessageOrder()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MESSAGEORDER$10) != 0;
        }
    }
    
    /**
     * Sets the "MessageOrder" element
     */
    public void setMessageOrder(cgl.narada.wsinfra.schemas.wsr.EmptyType messageOrder)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().find_element_user(MESSAGEORDER$10, 0);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().add_element_user(MESSAGEORDER$10);
            }
            target.set(messageOrder);
        }
    }
    
    /**
     * Appends and returns a new empty "MessageOrder" element
     */
    public cgl.narada.wsinfra.schemas.wsr.EmptyType addNewMessageOrder()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.EmptyType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.EmptyType)get_store().add_element_user(MESSAGEORDER$10);
            return target;
        }
    }
    
    /**
     * Unsets the "MessageOrder" element
     */
    public void unsetMessageOrder()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MESSAGEORDER$10, 0);
        }
    }
}
